package com.zm.zmgz;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.ApplicationContext;
import org.springframework.transaction.annotation.EnableTransactionManagement;


//@EnableAutoConfiguration(exclude = DataSourceAutoConfiguration.class).
@MapperScan(basePackages = "com.zm.zmgz.dao")
@SpringBootApplication
@EnableTransactionManagement  //开启事务
public class ZmgzApplication extends SpringBootServletInitializer { // extends SpringBootServletInitializer

    public static void main(String[] args) {
        ApplicationContext applicationContext =
        SpringApplication.run(ZmgzApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder){
        return builder.sources(this.getClass());
    }

}
